﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace CMN.Entity
{
      ///<summary>
    ///Normal_TagsEntity实体类(标签)
    ///</summary>
    [Serializable]
    public partial class Normal_TagsEntity
    {
        #region "Private Variables"
        private DataTableAction _DataTable_Action;  // 操作方法 Insert:增加 Update:修改 Delete:删除
        private Int32 _Id=0; // 自增Id
        private String _TagName=""; // 标签名称
        private String _ChannelPath=""; // 
        private Int32 _OrderNum = 0; // 排序
        private string _HtmlInfo = "";
        private String _SeoTagName = ""; // SEO标题
        private String _Dir = ""; // 连接
        #endregion

        #region "Public Variables"
        ///<summary>
        /// 操作方法 Insert:增加 Update:修改 Delete:删除
        ///</summary>
        public DataTableAction DataTable_Action
        {
            set { this._DataTable_Action = value; }
            get { return this._DataTable_Action; }
        }
        /// <summary>
        /// 自增Id
        /// </summary>
        public Int32  Id
        {
            set { this._Id = value; }
            get { return this._Id; }
        }

     
        /// <summary>
        /// 标签名称
        /// </summary>
        public String  TagName
        {
            set { this._TagName = value; }
            get { return this._TagName; }
        }
        /// <summary>
        /// 
        /// </summary>
        public String  ChannelPath
        {
            set { this._ChannelPath = value; }
            get { return this._ChannelPath; }
        }
        /// <summary>
        /// 排序
        /// </summary>
        public Int32 OrderNum
        {
            set { this._OrderNum = value; }
            get { return this._OrderNum; }
        }
        private int _IsRecommend = 0;
        /// <summary>
        /// 总数
        /// </summary>
        public Int32 CountNum
        {
            get;
            set;
        }
        /// <summary>
        /// 是否推荐
        /// </summary>
        public int IsRecommend
        {
            get { return _IsRecommend; }
            set { _IsRecommend = value; }
        }
        /// <summary>
        /// 标签简介
        /// </summary>
        public string HtmlInfo
        {
            get { return _HtmlInfo; }
            set { _HtmlInfo = value; }
        }
        /// <summary>
        /// 站外Url
        /// </summary>
        public string Url
        {
            get {
                if (string.IsNullOrEmpty(_Dir))
                {
                    return string.Concat("/tag/", HttpUtility.UrlEncode(TagName));
                }
                else
                    return string.Concat("/tag/", _Dir);
            }
        }
        /// <summary>
        /// SEO标题
        /// </summary>
        public String SeoTagName
        {
            set { this._SeoTagName = value; }
            get { return this._SeoTagName; }
        }
        /// <summary>
        /// 连接
        /// </summary>
        public String Dir
        {
            set { this._Dir = value; }
            get { return this._Dir; }
        }
        #endregion
    }
}
